<section>
    <div class="modal-header">
        <h3 class="modal-title">
            <small>Edit constraints for {{constraintsType}}:</small> {{constraintsName}}
        </h3>
    </div>
    <div class="modal-body">
        <form name="constraintsForm" class="form-horizontal" role="form">
            <div ng-hide="!authEnabled.headers || isAuthorized" class="form-group {{constraintsForm.rootPassword.$valid ? '' : 'has-error'}}">
                <label for="rootPassword" class="col-md-3 control-label">Root password</label>
                <div class="col-md-9">
                    <input class="form-control" type="password" ng-required="!isAuthorized && authEnabled.headers"
                           id="rootPassword" name="rootPassword" placeholder="root password" ng-model="rootPassword"/>
                </div>
            </div>
            <div class="form-group {{constraintsForm.consumersNumber.$valid ? '' : 'has-error'}}">
                <label for="consumersNumber" class="col-md-3 control-label">Consumers number</label>
                <div class="col-md-9">
                    <input class="form-control" id="consumersNumber" required name="consumersNumber" ng-model="consumersNumber"
                           ng-pattern="/^[0-9]+$/"/>
                </div>
            </div>
        </form>
    </div>
    <div class="modal-footer">
        <button class="btn btn-primary" ng-disabled="constraintsForm.$invalid" ng-click="save()">Save</button>
        <button class="btn btn-danger" ng-click="remove()">Remove</button>
        <button class="btn btn-warning" ng-click="$dismiss()">Cancel</button>
    </div>
</section>
